package cc.linker.steplink.crm.service;

import cc.linker.steplink.crm.commons.model.PcUserInfo;
import cc.linker.steplink.crm.domain.BindCustomerInfoPo;
import cc.linker.steplink.crm.domain.Customer;
import cc.linker.steplink.crm.domain.CustomerInfo;
import cc.linker.steplink.crm.domain.User;
import cc.linker.steplink.crm.response.GlobalException;

import java.util.List;
import java.util.Map;

public interface CustomerService {
    List<Map<String, Object>> getCustomerPageList(Map map);

    List<Map<String, Object>> listCustomer(Map map);

    List<Map<String, Object>> assembleCustomerExportInfo(List<Map<String,Object>> customerList,String orgId);

    Map<String, Object> getCustomerById(String id) throws GlobalException;

    void addCustomerSuffix(List<Map<String, Object>> maps);

    Map<String, Object> getCustomer(String id,String orgId) throws GlobalException;

    void insertCustomer(Customer customer, CustomerInfo customerInfo) throws GlobalException;

    void updateCustomer(Customer customer, CustomerInfo customerInfo, PcUserInfo user) throws GlobalException;

    List<Map<String, String>> getOutLine(Map<String, Object> map) throws GlobalException;

    Map<String, Object> getData(String id) throws GlobalException;

    Object getLabel(Map<String, Object> map) throws GlobalException;

    void note(String adminId, String customerId, String trackRemark) throws GlobalException;

    void change(Map<String, String> map) throws GlobalException;

    List<Map<String, Object>> listGroup(String orgId);

    void insertGroup(Map<String, Object> map) throws GlobalException;

    void editGroup(Map<String, Object> map) throws GlobalException;

    void delGroup(List<String> groupIds,String orgId) throws GlobalException;

    List<Map<String, String>> getGroupName(String orgId);

    Map<String, Object> getGroup(String id) throws GlobalException;

    List<String> countGroup(String s, String orgId);

    int judgeGroupNameRepeat(Map map);

    int getCustomerScore(String customerId);

    boolean setCustomerScore(Map map);

    List<Map<String, Object>> getActionLog(Map<String, String> map);

    List<Map<String, Object>> getActionContent(Map<String, String> map);

    String getCustomerLevel(String customerId);

    //获取活跃用户
    List<Map<String, Object>> getRobotUser(String orgIds, int limitNum);

    List<Map<String, Object>> getRobotUserMarket(String orgIds, int limitNum);

    String getLabelsByOpenidAndToken(String openid,String token);

    Integer getCustomerCountByOrgId(String orgId);

    void updateRobotActive(String customerId,String type);

    Map<String, Object> getListCustomerByCid(String id,String orgId);

    Map<String,Object> getOrgFunctionOrgId(String orgId);

    List<String> listCustomerByGroupId(String groupId);

    Map<String, Object> customerClassify(String orgId);

    Object dynamic(Map<String, Object> map);

    Object openList(String orgCode);

    Object userOpenIdList(String groupIds);

    void refreshGroup(Map<String, Object> map);


    Boolean isExitLiveAccountCustomer(String liveAccount,String orgId);

    Boolean isExitMarketingAccountCustomer(String marketingAccount,String orgId);

    /*
     * 修改用户的创作奖励
     * customerId：用户ID
     * liveAccount:直播账号
     * */
    Boolean updateLiveAccountByCustomerId(String customerId, String liveAccount);

    /*
     * 修改用户的创作奖励
     * customerId：用户ID
     * marketingAccount:营销账号
     * */
    Boolean updateMarketingAccountByCustomerId(String customerId, String marketingAccount);

    //通过融媒号ID获取用户ID
    String getCustomerIdByMarketing(String marketingAccount);

    int getCustomerIntegral(String customerId);

    void runOldData(String customerIds);

    void ansyYzjCustomer(Map<String, Object> params);

    int saveCustomer(Map<String, Object> customerData);

    void addBatchLog(Map<String, Object> customerData);

    void addBatch(Map<String, Object> batch);

    void saveBatch(Map<String, Object> batch);

    void saveBatchLog(Map<String, Object> batch);

    List<Map<String, Object>> getBatchList(Map<String, Object> map);

    List<Map<String, Object>> getBatchLogList(Map<String, Object> map);

    Map<String, Object> getBatchInfo(Integer batchId);

    void giveCoupon(Map<String, Object> params);

    void saveGiveLog(Map<String, Object> params);

    BindCustomerInfoPo getOrgCustomerInfoByCustomerId(String customerId);

    void saveTrack(Map<String, Object> params);
}
